<?php

use yii\widgets\Breadcrumbs;

?>
<link rel="stylesheet" href="/statics/css/category.css">
<div class="blog-list">
    <h2 class="public-title"><?=$name?>
        <div class="breadcrumbs">
            <span><i class="fa fa-map-marker"></i>当前位置：</span>
            <?=Breadcrumbs::widget([
                'homeLink'=>[
                    'label'=> '',
                    'template' => "<li><a href='/'>首页</a></li>",#修改默认的Home
                    'url'=>'/',   #修改默认的Home指向的url地址
                ],
                'itemTemplate' => "<li><i class='fa fa-angle-right'></i>{link}</li>",
                'links' => $breadcrumbs,
                'options' => [  #加载样式
                    'class' => 'bredcrumb clearfix'
                ]
            ]) ?></div>
    </h2>
    <?php foreach ($data['rows'] as $key=>$item):?>
        <div class="item item-blog">
            <aside>
                <a href="<?=$item['link']?>" target="_blank" class="post-thumb">
                    <img class="img-responsive" src="<?=$item['cover_image']?>" alt="image" onerror="this.src='/statics/images/245X138.jpg'">
                </a>
            </aside>
                <div class="media-body">
                    <h3 class="title mb-1"><a href="<?=$item['link']?>" target="_blank"><?=$item['title']?></a></h3>
                    <div class="see clearfix">
                        <div class="left mg-tag">
                            <?php if ($item['tags']!=''):?>
                                <i class="fa fa-tags"></i>
                                <?php foreach ($item['tags'] as $keys=>$els):?>
                                    <a href="<?=$els['tag_url']?>" target="_blank"><?=$els["text"]?></a>
                                <?php endforeach;?>
                            <?php endif;?>
                            <span><i class="fa fa-calendar"></i><?=$item['release_at']?></span>
                        </div>
                        <div class="right">

                            <!--<span class="comment"><a href="#">8 comments</a></span>-->
                        </div>
                    </div>
                    <div class="intro"><?=$item['summary']?></div>
                </div><!--//media-body-->
        </div>
    <?php endforeach;?>
    <?=$this->render("//layouts/_page",['page'=>$page,'urlLeft'=>$url,'urlRight'=>'','total'=>$data['total'],'pageSize'=>$pageSize]);?>
</div>